package com.heima.controller;

import com.heima.MyDataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sxd
 * @create 2022-07 -0911:54:35
 */
//基于rest模式  --的简单的控制器
    @RestController
    @RequestMapping("/books")//模块名
public class BookController {
        @Autowired
        private MyDataSource myDataSource;
        @GetMapping
        public String test(){
            System.out.println("boot is runing...");
            System.out.println(myDataSource.getDriver());
            return "running！";
        }
}
